package com.cmict.data.infra.api.rdb;

import com.cmict.data.framework.common.pojo.CommonResult;
import com.cmict.data.infra.api.rdb.dto.SourceDTO;
import com.cmict.data.infra.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(name = ApiConstants.NAME)
@Api(tags = "RPC 服务 - 数据源")
public interface RdbApi {

    String PREFIX = ApiConstants.PREFIX + "/datasource";



    @GetMapping(PREFIX + "/getData")
    @ApiOperation("获取数据源中数据")
    @ApiImplicitParam(name = "id", value = "获取数据源中数据", example = "1", required = true)
    CommonResult sourceTestList(@RequestParam("id") Long id);

    @GetMapping(PREFIX + "/getSourceDOById")
    @ApiOperation("获取数据源实体")
    @ApiImplicitParam(name = "id", value = "获取数据源实体", example = "1", required = true)
    CommonResult<SourceDTO> getSourceDOById(@RequestParam("id") Long id);
}
